<?php

require_once 'init.php';
require_once 'cf/shop.inc';

$page = Page::get('prices');
$smarty->assign('page',$page);

$groups = Groups::toHierarchyTree();
$products = array();
$options = array();
foreach ($groups as $group) {
	$productsInGroup = new Products($group['id']);
	$products[$group['id']] = $productsInGroup->getList();
}

$smarty->assign('groups',$groups);
$smarty->assign('products', $products);

show(
	'prices', 
	$page->name(), 
	Pages::getPath($page->id()), 
	$page->title(), 
	$page->keywords(), 
	$page->descr()
);

?>